# 两种不同的启动子launch的方式


from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.substitutions import PathJoinSubstitution
from launch_ros.substitutions import FindPackageShare

def generate_launch_description():
    colors = {"background_r":"200"}

    return LaunchDescription([
        IncludeLaunchDescription(
            PathJoinSubstitution([
                FindPackageShare("launch_demo"),
                "launch",
                "child.py"
            ]),
            launch_arguments={
                "new_background_r" : colors["background_r"]
            }.items()
        )
    ])